<div id="content">
	<div class="row s_page_title">
		<sa-big-breadcrumbs [items]="['运维管理[环卫]','围栏管理']" icon="fa fa-newspaper-o" class="col-xs-12 col-sm-7 col-md-7 col-lg-4"></sa-big-breadcrumbs>
	</div>
	
	
	<sa-widgets-grid>
		<div class="s_table">
			<div sa-widget [editbutton]="false" color="darken" class="clearfix">
				<header><span class="widget-icon"> <i class="fa fa-table"></i> </span><h2>围栏管理</h2></header>
				<div>
					<div class="widget-body no-padding">
						<div class="page-header clearfix s_table_opreation">
							<div class="left page-header-btn">
								<div class="top_module">
									<span class="module_text">公司名称</span>
									<sa-company-tree companyTreeId="companyTree" (companySelected)="companySelected($event)"></sa-company-tree>
								</div>
								<!-- <div class="top_module">
									<span class="module_text">围栏名称</span>
									<input  class="module_inp"  type="text"  [(ngModel)]="railName" placeholder="围栏名称" style="padding: 0 12px;width: 181px;"/>
								</div> -->
								<button type="button" class="btn btn-primary" (click)="table_search()">查询</button>
								<button type="button" class="btn btn-primary" (click)="addRill()">添加</button>
							</div>
							<div class="right top-search" style="width:220px">
								<input type="text" [(ngModel)]="searchKey" (change)="table_search()" class="search-input" placeholder="围栏名称">
								<span class="top-search-box">
									<button class="top-search-btn" type="button" (click)="table_search()"> <i class="fa fa-search"></i></button>
								</span>
							</div>
						</div>
						<div class="table_scroll">
							<table class="display dataTables responsive table table-striped table-bordered table-hover dataTable s_h5_table">
								<thead>
									<tr>
										<th>围栏名称</th>
										<th>所属公司</th>
										<th>围栏类型</th>
										<th>范围[米]</th>
										<th>围栏停留时长</th>
										<th>更新人</th>
										<th>更新时间</th>
										<th>操作</th>
									</tr>
								</thead>
								<tbody>
									<tr *ngFor="let row of tableData" >
										<td>{{row.railName}}</td>
										<td>{{row.companyName}}</td>
										<td>
											<span *ngIf="row.typeId ==='1'">装货点</span>
											<span *ngIf="row.typeId ==='2'">卸货点</span>
										</td>
										<td>
											<span *ngIf="row.radius>0">{{row.radius}}</span>
											<span *ngIf="row.radius<1">多边形</span>
										</td>
										<td>{{row.stayTime}}</td>
										<td>{{row.updateUser}}</td>
										<td>{{row.updateTime}}</td>
										<td>
										 	<button type="button"  (click)="editRail(row)"> 编辑</button>
											<button type="button" (click)="delRail(row)">删除</button>
										</td>
									</tr>
								</tbody>
							</table>
						</div>
						<div class="table-fix clearfix">
							<paginator [totalRecords]="totalCount"
						           [rows]="pageSize"
						           [currentPage]="curPage - 1"
						           (onPageChange)="paginate($event)">
							</paginator>
							<button type="button" class="btn default refresh_btn" (click)="refresh()"><i class="fa fa-refresh"></i></button>
						</div>
					</div>
				</div>
			</div>
		</div>
	</sa-widgets-grid>
	

	
</div>
